/*
 * Copyright (c) 2021-2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "status_receiver_proxy.h"

#include "bundle_mgr_service.h"

namespace OHOS {
namespace AppExecFwk {
namespace {
// struct for transform internal error code/message to result which open to developer
struct ReceivedResult {
    int32_t clientCode = -1;
    const char* clientMessage;
};

const char* MSG_SUCCESS = "[SUCCESS]";
const char* MSG_ERR_INSTALL_INTERNAL_ERROR = "[ERR_INSTALL_INTERNAL_ERROR]";
const char* MSG_ERR_INSTALL_HOST_INSTALLER_FAILED = "[ERR_INSTALL_HOST_INSTALLER_FAILED]";
const char* MSG_ERR_INSTALL_PARSE_FAILED = "[ERR_INSTALL_PARSE_FAILED]";
const char* MSG_ERR_INSTALL_VERSION_DOWNGRADE = "[ERR_INSTALL_VERSION_DOWNGRADE]";
const char* MSG_ERR_INSTALL_VERIFICATION_FAILED = "[ERR_INSTALL_VERIFICATION_FAILED]";
const char* MSG_ERR_INSTALL_FAILED_INVALID_SIGNATURE_FILE_PATH =
    "[MSG_ERR_INSTALL_FAILED_INVALID_SIGNATURE_FILE_PATH]";
const char* MSG_ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE_FILE =
    "[MSG_ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE_FILE]";
const char* MSG_ERR_INSTALL_FAILED_NO_BUNDLE_SIGNATURE = "[MSG_ERR_INSTALL_FAILED_NO_BUNDLE_SIGNATURE]";
const char* MSG_ERR_INSTALL_FAILED_VERIFY_APP_PKCS7_FAIL = "[MSG_ERR_INSTALL_FAILED_VERIFY_APP_PKCS7_FAIL]";
const char* MSG_ERR_INSTALL_FAILED_PROFILE_PARSE_FAIL = "[MSG_ERR_INSTALL_FAILED_PROFILE_PARSE_FAIL]";
const char* MSG_ERR_INSTALL_FAILED_APP_SOURCE_NOT_TRUESTED = "[MSG_ERR_INSTALL_FAILED_APP_SOURCE_NOT_TRUESTED]";
const char* MSG_ERR_INSTALL_FAILED_BAD_DIGEST = "[MSG_ERR_INSTALL_FAILED_BAD_DIGEST]";
const char* MSG_ERR_INSTALL_FAILED_BUNDLE_INTEGRITY_VERIFICATION_FAILURE =
    "[MSG_ERR_INSTALL_FAILED_BUNDLE_INTEGRITY_VERIFICATION_FAILURE]";
const char* MSG_ERR_INSTALL_FAILED_FILE_SIZE_TOO_LARGE = "[MSG_ERR_INSTALL_FAILED_FILE_SIZE_TOO_LARGE]";
const char* MSG_ERR_INSTALL_FAILED_BAD_PUBLICKEY = "[MSG_ERR_INSTALL_FAILED_BAD_PUBLICKEY]";
const char* MSG_ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE = "[MSG_ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE]";
const char* MSG_ERR_INSTALL_FAILED_NO_PROFILE_BLOCK_FAIL = "[MSG_ERR_INSTALL_FAILED_NO_PROFILE_BLOCK_FAIL]";
const char* MSG_ERR_INSTALL_FAILED_BUNDLE_SIGNATURE_VERIFICATION_FAILURE =
    "[MSG_ERR_INSTALL_FAILED_BUNDLE_SIGNATURE_VERIFICATION_FAILURE]";
const char* MSG_ERR_INSTALL_FAILED_VERIFY_SOURCE_INIT_FAIL = "[MSG_ERR_INSTALL_FAILED_VERIFY_SOURCE_INIT_FAIL]";
const char* MSG_ERR_INSTALL_FAILED_DEVICE_UNAUTHORIZED = "[MSG_ERR_INSTALL_FAILED_DEVICE_UNAUTHORIZED]";
const char* MSG_ERR_INSTALL_FAILED_INCOMPATIBLE_SIGNATURE = "[ERR_INSTALL_FAILED_INCOMPATIBLE_SIGNATURE]";
const char* MSG_ERR_INSTALL_FAILED_INCONSISTENT_SIGNATURE = "[MSG_ERR_INSTALL_FAILED_INCONSISTENT_SIGNATURE]";
const char* MSG_ERR_INSTALL_FAILED_MODULE_NAME_EMPTY = "[MSG_ERR_INSTALL_FAILED_MODULE_NAME_EMPTY]";
const char* MSG_ERR_INSTALL_FAILED_MODULE_NAME_DUPLICATE = "[MSG_ERR_INSTALL_FAILED_MODULE_NAME_DUPLICATE]";
const char* MSG_ERR_INSTALL_FAILED_CHECK_HAP_HASH_PARAM = "[MSG_ERR_INSTALL_FAILED_CHECK_HAP_HASH_PARAM]";
const char* MSG_ERR_INSTALL_PARAM_ERROR = "[MSG_ERR_INSTALL_PARAM_ERROR]";
const char* MSG_ERR_INSTALL_PERMISSION_DENIED = "[MSG_ERR_INSTALL_PERMISSION_DENIED]";
const char* MSG_ERR_INSTALL_ENTRY_ALREADY_EXIST = "[MSG_ERR_INSTALL_ENTRY_ALREADY_EXIST]";
const char* MSG_ERR_INSTALL_STATE_ERROR = "[MSG_ERR_INSTALL_STATE_ERROR]";
const char* MSG_ERR_INSTALL_FILE_PATH_INVALID = "[MSG_ERR_INSTALL_FILE_PATH_INVALID]";
const char* MSG_ERR_INSTALL_INVALID_BUNDLE_FILE = "[ERR_INSTALL_INVALID_BUNDLE_FILE]";
const char* MSG_ERR_INSTALL_INVALID_HAP_SIZE = "[ERR_INSTALL_INVALID_HAP_SIZE]";
const char* MSG_ERR_INSTALL_GENERATE_UID_ERROR = "[ERR_INSTALL_GENERATE_UID_ERROR]";
const char* MSG_ERR_INSTALL_INSTALLD_SERVICE_ERROR = "[ERR_INSTALL_INSTALLD_SERVICE_ERROR]";
const char* MSG_ERR_INSTALL_BUNDLE_MGR_SERVICE_ERROR = "[ERR_INSTALL_BUNDLE_MGR_SERVICE_ERROR]";
const char* MSG_ERR_INSTALL_ALREADY_EXIST = "[ERR_INSTALL_ALREADY_EXIST]";
const char* MSG_ERR_INSTALL_BUNDLENAME_NOT_SAME = "[ERR_INSTALL_BUNDLENAME_NOT_SAME]";
const char* MSG_ERR_INSTALL_VERSIONCODE_NOT_SAME = "[ERR_INSTALL_VERSIONCODE_NOT_SAME]";
const char* MSG_ERR_INSTALL_VERSIONNAME_NOT_SAME = "[ERR_INSTALL_VERSIONNAME_NOT_SAME]";
const char* MSG_ERR_INSTALL_MINCOMPATIBLE_VERSIONCODE_NOT_SAME =
    "[ERR_INSTALL_MINCOMPATIBLE_VERSIONCODE_NOT_SAME]";
const char* MSG_ERR_INSTALL_VENDOR_NOT_SAME = "[ERR_INSTALL_VENDOR_NOT_SAME]";
const char* MSG_ERR_INSTALL_RELEASETYPE_TARGET_NOT_SAME = "[ERR_INSTALL_RELEASETYPE_TARGET_NOT_SAME]";
const char* MSG_ERR_INSTALL_RELEASETYPE_NOT_SAME = "[ERR_INSTALL_RELEASETYPE_NOT_SAME]";
const char* MSG_ERR_INSTALL_RELEASETYPE_COMPATIBLE_NOT_SAME = "[ERR_INSTALL_RELEASETYPE_COMPATIBLE_NOT_SAME]";
const char* MSG_ERR_INSTALL_VERSION_NOT_COMPATIBLE = "[ERR_INSTALL_VERSION_NOT_COMPATIBLE]";
const char* MSG_ERR_INSTALL_APP_DISTRIBUTION_TYPE_NOT_SAME = "[ERR_INSTALL_APP_DISTRIBUTION_TYPE_NOT_SAME]";
const char* MSG_ERR_INSTALL_APP_PROVISION_TYPE_NOT_SAME = "[ERR_INSTALL_APP_PROVISION_TYPE_NOT_SAME]";
const char* MSG_ERR_INSTALL_INVALID_NUMBER_OF_ENTRY_HAP = "[ERR_INSTALL_INVALID_NUMBER_OF_ENTRY_HAP]";
const char* MSG_ERR_INSTALL_DISK_MEM_INSUFFICIENT = "[MSG_ERR_INSTALL_DISK_MEM_INSUFFICIENT]";
const char* MSG_ERR_NATIVE_INSTALL_FAILED = "[MSG_ERR_NATIVE_INSTALL_FAILED]";
const char* MSG_ERR_NATIVE_UNINSTALL_FAILED = "[MSG_ERR_NATIVE_UNINSTALL_FAILED]";
const char* MSG_ERR_NATIVE_HNP_EXTRACT_FAILED = "[MSG_ERR_NATIVE_HNP_EXTRACT_FAILED]";
const char* MSG_ERR_INSTALL_GRANT_REQUEST_PERMISSIONS_FAILED =
    "[MSG_ERR_INSTALL_GRANT_REQUEST_PERMISSIONS_FAILED]";
const char* MSG_ERR_INSTALL_UPDATE_HAP_TOKEN_FAILED = "[MSG_ERR_INSTALL_UPDATE_HAP_TOKEN_FAILED]";
const char* MSG_ERR_INSTALL_SINGLETON_NOT_SAME = "[MSG_ERR_INSTALL_SINGLETON_NOT_SAME]";
const char* MSG_ERR_INSTALL_ZERO_USER_WITH_NO_SINGLETON = "[MSG_ERR_INSTALL_ZERO_USER_WITH_NO_SINGLETON]";
const char* MSG_ERR_INSTALL_CHECK_SYSCAP_FAILED = "[MSG_ERR_INSTALL_CHECK_SYSCAP_FAILED]";
const char* MSG_ERR_INSTALL_APPTYPE_NOT_SAME = "[MSG_ERR_INSTALL_APPTYPE_NOT_SAME]";
const char* MSG_ERR_INSTALL_URI_DUPLICATE = "[MSG_ERR_INSTALL_URI_DUPLICATE]";
const char* MSG_ERR_INSTALL_TYPE_ERROR = "[ERR_INSTALL_TYPE_ERROR]";
const char* MSG_ERR_INSTALL_SDK_INCOMPATIBLE = "[ERR_INSTALL_SDK_INCOMPATIBLE]";
const char* MSG_ERR_INSTALL_SO_INCOMPATIBLE = "[ERR_INSTALL_SO_INCOMPATIBLE]";
const char* MSG_ERR_INSTALL_AN_INCOMPATIBLE = "[ERR_INSTALL_AN_INCOMPATIBLE]";
const char* MSG_ERR_INSTALL_PARSE_UNEXPECTED = "[ERR_INSTALL_PARSE_UNEXPECTED]";
const char* MSG_ERR_INSTALL_PARSE_MISSING_BUNDLE = "[ERR_INSTALL_PARSE_MISSING_BUNDLE]";
const char* MSG_ERR_INSTALL_PARSE_MISSING_ABILITY = "[ERR_INSTALL_PARSE_MISSING_ABILITY]";
const char* MSG_ERR_INSTALL_PARSE_NO_PROFILE = "[ERR_INSTALL_PARSE_NO_PROFILE]";
const char* MSG_ERR_INSTALL_PARSE_BAD_PROFILE = "[ERR_INSTALL_PARSE_BAD_PROFILE]";
const char* MSG_ERR_INSTALL_PARSE_PROFILE_PROP_TYPE_ERROR = "[ERR_INSTALL_PARSE_PROFILE_PROP_TYPE_ERROR]";
const char* MSG_ERR_INSTALL_PARSE_PROFILE_MISSING_PROP = "[ERR_INSTALL_PARSE_PROFILE_MISSING_PROP]";
const char* MSG_ERR_INSTALL_PARSE_PERMISSION_ERROR = "[ERR_INSTALL_PARSE_PERMISSION_ERROR]";
const char* MSG_ERR_INSTALL_PARSE_PROFILE_PROP_CHECK_ERROR = "[ERR_INSTALL_PARSE_PROFILE_PROP_CHECK_ERROR]";
const char* MSG_ERR_INSTALL_PARSE_PROFILE_PROP_SIZE_CHECK_ERROR = "[ERR_INSTALL_PARSE_PROFILE_PROP_SIZE_CHECK_ERROR]";
const char* MSG_ERR_INSTALL_PARSE_RPCID_FAILED = "[ERR_INSTALL_PARSE_RPCID_FAILED]";
const char* MSG_ERR_INSTALL_PARSE_NATIVE_SO_FAILED = "[ERR_INSTALL_PARSE_NATIVE_SO_FAILED]";
const char* MSG_ERR_INSTALL_PARSE_AN_FAILED = "[ERR_INSTALL_PARSE_AN_FAILED]";

const char* MSG_ERR_INSTALLD_CLEAN_DIR_FAILED = "[MSG_ERR_INSTALLD_CLEAN_DIR_FAILED]";
const char* MSG_ERR_INSTALLD_RNAME_DIR_FAILED = "[MSG_ERR_INSTALLD_RNAME_DIR_FAILED]";
const char* MSG_ERR_INSTALLD_EXTRACT_FILES_FAILED = "[MSG_ERR_INSTALLD_EXTRACT_FILES_FAILED]";
const char* MSG_ERR_INSTALLD_REMOVE_DIR_FAILED = "[ERR_INSTALLD_REMOVE_DIR_FAILED]";
const char* MSG_ERR_INSTALLD_CHOWN_FAILED = "[ERR_INSTALLD_CHOWN_FAILED,]";
const char* MSG_ERR_INSTALLD_CREATE_DIR_EXIST = "[ERR_INSTALLD_CREATE_DIR_EXIST]";
const char* MSG_ERR_INSTALLD_CREATE_DIR_FAILED = "[ERR_INSTALLD_CREATE_DIR_FAILED]";
const char* MSG_ERR_INSTALLD_GET_PROXY_ERROR = "[ERR_INSTALLD_GET_PROXY_ERROR]";
const char* MSG_ERR_INSTALLD_PARAM_ERROR = "[ERR_INSTALLD_PARAM_ERROR]";
const char* MSG_ERR_INSTALLD_PERMISSION_DENIED = "[ERR_INSTALLD_PERMISSION_DENIED]";
const char* MSG_ERR_INSTALLD_SET_SELINUX_LABEL_FAILED = "[ERR_INSTALLD_SET_SELINUX_LABEL_FAILED]";
const char* MSG_ERR_INSTALL_NOT_UNIQUE_DISTRO_MODULE_NAME = "[ERR_INSTALL_NOT_UNIQUE_DISTRO_MODULE_NAME]";
const char* MSG_ERR_INSTALL_INCONSISTENT_MODULE_NAME = "[MSG_ERR_INSTALL_INCONSISTENT_MODULE_NAME]";
const char* MSG_ERR_INSTALL_SINGLETON_INCOMPATIBLE = "[MSG_ERR_INSTALL_SINGLETON_INCOMPATIBLE]";
const char* MSG_ERR_INSTALL_DISALLOWED = "[MSG_ERR_INSTALL_DISALLOWED]";
const char* MSG_ERR_INSTALL_DEVICE_TYPE_NOT_SUPPORTED = "[MSG_ERR_INSTALL_DEVICE_TYPE_NOT_SUPPORTED]";
const char* MSG_ERR_INSTALL_CHECK_SYSCAP_FAILED_AND_DEVICE_TYPE_NOT_SUPPORTED =
    "[MSG_ERR_INSTALL_CHECK_SYSCAP_FAILED_AND_DEVICE_TYPE_NOT_SUPPORTED]";
const char* MSG_ERR_INSTALL_DEPENDENT_MODULE_NOT_EXIST = "[MSG_ERR_INSTALL_DEPENDENT_MODULE_NOT_EXIST]";
const char* MSG_ERR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED = "[MSG_ERR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED]";
const char* MSG_ERR_INSTALL_COMPATIBLE_POLICY_NOT_SAME = "[MSG_ERR_INSTALL_COMPATIBLE_POLICY_NOT_SAME]";
const char* MSG_ERR_INSTALL_FILE_IS_SHARED_LIBRARY = "[MSG_ERR_INSTALL_FILE_IS_SHARED_LIBRARY]";
const char* MSG_ERR_INSTALL_INVALID_HAP_NAME = "[ERR_INSTALL_INVALID_HAP_NAME]";
const char* MSG_ERR_INSTALL_PROXY_DATA_URI_WRONG = "[ERR_INSTALL_PROXY_DATA_URI_WRONG]";
const char* MSG_ERR_INSTALL_PROXY_DATA_PERMISSION_WRONG = "[ERR_INSTALL_PROXY_DATA_PERMISSION_WRONG]";
const char* MSG_ERR_UNINSTALL_PARAM_ERROR = "[ERR_UNINSTALL_PARAM_ERROR]";
const char* MSG_ERR_UNINSTALL_PERMISSION_DENIED = "[MSG_ERR_UNINSTALL_PERMISSION_DENIED]";
const char* MSG_ERR_UNINSTALL_DISPOSED_RULE_DENIED = "[MSG_ERR_UNINSTALL_DISPOSED_RULE_DENIED]";
const char* MSG_ERR_UNINSTALL_INVALID_NAME = "[ERR_UNINSTALL_INVALID_NAME]";
const char* MSG_ERR_UNINSTALL_BUNDLE_MGR_SERVICE_ERROR = "[ERR_UNINSTALL_BUNDLE_MGR_SERVICE_ERROR,]";
const char* MSG_ERR_UNINSTALL_MISSING_INSTALLED_BUNDLE = "[ERR_UNINSTALL_MISSING_INSTALLED_BUNDLE]";
const char* MSG_ERR_UNINSTALL_MISSING_INSTALLED_MODULE = "[ERR_UNINSTALL_MISSING_INSTALLED_MODULE]";
const char* MSG_ERR_UNINSTALL_KILLING_APP_ERROR = "[ERR_UNINSTALL_KILLING_APP_ERROR]";
const char* MSG_ERR_UNINSTALL_SYSTEM_APP_ERROR = "[MSG_ERR_UNINSTALL_SYSTEM_APP_ERROR]";
const char* MSG_ERR_UNINSTALL_DISALLOWED = "[MSG_ERR_UNINSTALL_DISALLOWED]";
const char* MSG_ERR_UNINSTALL_SHARE_APP_LIBRARY_NOT_EXIST = "[ERR_UNINSTALL_SHARE_APP_LIBRARY_NOT_EXIST]";
const char* MSG_ERR_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED = "[ERR_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED]";
const char* MSG_ERR_UNINSTALL_BUNDLE_IS_SHAED_LIBRARY = "[ERR_UNINSTALL_BUNDLE_IS_SHARED_LIBRARY]";
const char* MSG_ERR_UNKNOWN = "[ERR_UNKNOWN]";
const char* MSG_ERR_INSTALL_ISOLATION_MODE_FAILED = "[MSG_INSTALL_ISOLATION_MODE_CONFLICTED]";

const char* MSG_ERR_RECOVER_GET_BUNDLEPATH_ERROR = "[ERR_RECOVER_GET_BUNDLEPATH_ERROR]";
const char* MSG_ERR_RECOVER_INVALID_BUNDLE_NAME = "[ERR_RECOVER_INVALID_BUNDLE_NAME]";
const char* MSG_ERR_RECOVER_NOT_ALLOWED = "[ERR_RECOVER_NOT_ALLOWED]";
const char* MSG_ERR_UNINSTALL_AND_RECOVER_NOT_PREINSTALLED_BUNDLE =
    "[ERR_UNINSTALL_AND_RECOVER_NOT_PREINSTALLED_BUNDLE]";
const char* MSG_ERR_FAILED_SERVICE_DIED = "[ERR_FAILED_SERVICE_DIED]";
const char* MSG_ERR_FAILED_GET_INSTALLER_PROXY = "[MSG_ERR_FAILED_GET_INSTALLER_PROXY]";
const char* MSG_ERR_OPERATION_TIME_OUT = "[MSG_ERR_OPERATION_TIME_OUT]";
const char* MSG_ERR_USER_NOT_EXIST = "[ERR_USER_NOT_EXIST]";
const char* MSG_ERR_USER_CREATE_FAILED = "[ERR_USER_CREATE_FAILED]";
const char* MSG_ERR_USER_REMOVE_FAILED = "[ERR_USER_REMOVE_FAILED]";
const char* MSG_ERR_USER_NOT_INSTALL_HAP = "[ERR_USER_NOT_INSTALL_HAP]";
const char* MSG_ERR_ASAN_ENABLED_NOT_SAME = "[ERR_INSTALL_ASAN_ENABLED_NOT_SAME]";
const char* MSG_ERR_ASAN_ENABLED_NOT_SUPPORT = "[ERR_ASAN_ENABLED_NOT_SUPPORT]";
const char* MSG_ERR_INSTALL_BUNDLE_TYPE_NOT_SAME = "[ERR_INSTALL_BUNDLE_TYPE_NOT_SAME]";

// overlay installation
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR = "[ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_NAME =
    "[ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_NAME]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_INVALID_MODULE_NAME =
    "[ERR_OVERLAY_INSTALLATION_FAILED_INVALID_MODULE_NAME]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_ERROR_HAP_TYPE = "[ERR_OVERLAY_INSTALLATION_FAILED_ERROR_HAP_TYPE]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_ERROR_BUNDLE_TYPE =
    "[ERR_OVERLAY_INSTALLATION_FAILED_ERROR_BUNDLE_TYPE]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_MISSED =
    "[ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_MISSED]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_NAME_MISSED =
    "[ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_NAME_MISSED]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_NOT_SAME =
    "[ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_NOT_SAME]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_EXTERNAL_OVERLAY_EXISTED_SIMULTANEOUSLY =
    "[ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_EXTERNAL_OVERLAY_EXISTED_SIMULTANEOUSLY]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_TARGET_PRIORITY_NOT_SAME =
    "[ERR_OVERLAY_INSTALLATION_FAILED_TARGET_PRIORITY_NOT_SAME]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_INVALID_PRIORITY =
    "[ERR_OVERLAY_INSTALLATION_FAILED_INVALID_PRIORITY]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_INCONSISTENT_VERSION_CODE =
    "[ERR_OVERLAY_INSTALLATION_FAILED_INCONSISTENT_VERSION_CODE]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_SERVICE_EXCEPTION =
    "[ERR_OVERLAY_INSTALLATION_FAILED_SERVICE_EXCEPTION]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_BUNDLE_NAME_SAME_WITH_TARGET_BUNDLE_NAME =
    "[ERR_OVERLAY_INSTALLATION_FAILED_BUNDLE_NAME_SAME_WITH_TARGET_BUNDLE_NAME]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_NO_SYSTEM_APPLICATION_FOR_EXTERNAL_OVERLAY =
    "[ERR_OVERLAY_INSTALLATION_FAILED_NO_SYSTEM_APPLICATION_FOR_EXTERNAL_OVERLAY]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_DIFFERENT_SIGNATURE_CERTIFICATE =
    "[ERR_OVERLAY_INSTALLATION_FAILED_DIFFERENT_SIGNATURE_CERTIFICATE]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_IS_OVERLAY_BUNDLE =
    "[ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_IS_OVERLAY_BUNDLE]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_IS_OVERLAY_MODULE =
    "[ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_IS_OVERLAY_MODULE]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_OVERLAY_TYPE_NOT_SAME =
    "[ERR_OVERLAY_INSTALLATION_FAILED_OVERLAY_TYPE_NOT_SAME]";
const char* MSG_ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_DIR =
    "[ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_DIR]";
const char* MSG_ERR_APPEXECFWK_INSTALL_DEBUG_NOT_SAME = "[MSG_ERR_APPEXECFWK_INSTALL_DEBUG_NOT_SAME]";
const char* MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED = "[MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED]";
const char* MSG_ERR_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID = "[MSG_ERR_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID]";
const char* MSG_ERR_UNINSTALL_FROM_BMS_EXTENSION_FAILED = "[MSG_ERR_UNINSTALL_FROM_BMS_EXTENSION_FAILED]";
const char* MSG_ERR_INSTALL_SELF_UPDATE_NOT_MDM = "[MSG_ERR_INSTALL_SELF_UPDATE_NOT_MDM]";
const char* MSG_ERR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME = "[MSG_ERR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME]";
const char* MSG_ERR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED = "[MSG_ERR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED]";
const char* MSG_ERR_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED
    = "[MSG_ERR_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED]";
const char* MSG_ERR_INSTALLD_COPY_FILE_FAILED = "[MSG_ERR_INSTALLD_COPY_FILE_FAILED]";
const char* MSG_ERR_INSTALL_GWP_ASAN_ENABLED_NOT_SAME = "[MSG_ERR_INSTALL_GWP_ASAN_ENABLED_NOT_SAME]";
const char* MSG_ERR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED = "[MSG_ERR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED]";
const char* MSG_ERR_INSTALL_CHECK_ENCRYPTION_FAILED = "[MSG_ERR_INSTALL_CHECK_ENCRYPTION_FAILED]";
const char* MSG_ERR_INSTALL_CODE_SIGNATURE_DELIVERY_FILE_FAILED =
    "[MSG_ERR_INSTALL_CODE_SIGNATURE_DELIVERY_FILE_FAILED]";
const char* MSG_ERR_INSTALL_CODE_SIGNATURE_REMOVE_FILE_FAILED =
    "[MSG_ERR_INSTALL_CODE_SIGNATURE_REMOVE_FILE_FAILED]";
const char* MSG_ERR_INSTALL_CODE_APP_CONTROLLED_FAILED =
    "[MSG_ERR_INSTALL_CODE_APP_CONTROLLED_FAILED]";
const char* MSG_ERR_UNINSTALL_CONTROLLED = "[MSG_ERR_UNINSTALL_CONTROLLED]";
const char* MSG_ERR_INSTALL_DEBUG_ENCRYPTED_BUNDLE_FAILED = "[MSG_ERR_INSTALL_DEBUG_ENCRYPTED_BUNDLE_FAILED]";
const char* MSG_ERR_INSTALL_RELEASE_BUNDLE_NOT_ALLOWED_FOR_SHELL =
    "[MSG_ERR_INSTALL_RELEASE_BUNDLE_NOT_ALLOWED_FOR_SHELL]";
const char* MSG_ERR_INSTALL_ENCRYPTED_BUNDLE_NOT_ALLOWED_FOR_SHELL =
    "[MSG_ERR_INSTALL_ENCRYPTED_BUNDLE_NOT_ALLOWED_FOR_SHELL]";
const char* MSG_ERR_INSTALL_APPID_NOT_SAME_WITH_PREINSTALLED =
    "[MSG_ERR_INSTALL_APPID_NOT_SAME_WITH_PREINSTALLED]";
const char* MSG_ERR_INSTALL_BUNDLE_NOT_ALLOWED_FOR_SHELL_IN_OOBE =
    "[MSG_ERR_INSTALL_BUNDLE_NOT_ALLOWED_FOR_SHELL_IN_OOBE]";
const char* MSG_ERR_INSTALL_OS_INTEGRATION_BUNDLE_NOT_ALLOWED_FOR_SHELL  =
    "[MSG_ERR_INSTALL_OS_INTEGRATION_BUNDLE_NOT_ALLOWED_FOR_SHELL ]";
const char* MSG_ERR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL =
    "[MSG_ERR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL]";
const char* MSG_ERR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED  =
    "[MSG_ERR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED]";
const char* MSG_ERR_INSTALL_U1ENABLE_CAN_ONLY_INSTALL_IN_U1_WITH_NOT_SINGLETON  =
    "[MSG_ERR_INSTALL_U1ENABLE_CAN_ONLY_INSTALL_IN_U1_WITH_NOT_SINGLETON]";
const char* MSG_ERR_INSTALL_BUNDLE_CAN_NOT_BOTH_EXISTED_IN_U1_AND_OTHER_USERS  =
    "[MSG_ERR_INSTALL_BUNDLE_CAN_NOT_BOTH_EXISTED_IN_U1_AND_OTHER_USERS]";
const char* MSG_ERR_INSTALL_U1_ENABLE_NOT_SAME_IN_ALL_BUNDLE_INFOS  =
    "[MSG_ERR_INSTALL_U1_ENABLE_NOT_SAME_IN_ALL_BUNDLE_INFOS]";
const char* MSG_ERR_INSTALL_NOT_SUPPORT_STATIC_ATOMIC_SERVICE  =
    "[MSG_ERR_INSTALL_NOT_SUPPORT_STATIC_ATOMIC_SERVICE]";
const char* MSG_ERR_INSTALL_MORE_THAN_ONE_APP = "[MSG_ERR_INSTALL_MORE_THAN_ONE_APP]";
const char* MSG_ERR_INSTALL_DECOMPRESS_APP_FAILED = "[MSG_ERR_INSTALL_DECOMPRESS_APP_FAILED]";
const char* MSG_ERR_INSTALL_NO_SUITABLE_BUNDLES = "[MSG_ERR_INSTALL_NO_SUITABLE_BUNDLES]";
const char* MSG_ERR_INSTALL_VERIFY_APP_SIGNATURE_FAILED = "[MSG_ERR_INSTALL_VERIFY_APP_SIGNATURE_FAILED]";

const std::unordered_map<int32_t, struct ReceivedResult> MAP_RECEIVED_RESULTS {
    {ERR_OK, {IStatusReceiver::SUCCESS, MSG_SUCCESS}},
    {ERR_APPEXECFWK_INSTALL_INTERNAL_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_NULL_PTR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_UPDATE_BUNDLE_INSTALL_STATUS_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_RMV_HSP_BY_VERSION_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_GET_INSTALL_TEMP_BUNDLE_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_VERIFY_PKG_INSTALL_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_INIT_INSTALL_TEMP_BUNDLE_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_SAVE_FIRST_INSTALL_BUNDLE_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_RMV_MODULE_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_ADD_MODULE_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_UPDATE_BUNDLE_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_FETCH_BUNDLE_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_HAP_VERIFY_RES_EMPTY,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_RMV_USERINFO_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_GET_USERINFO_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_ADD_BUNDLE_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_UNINSTALL_ALL_SANDBOX_BUNDLE_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_HAP_ENCRYPTION_CHECK_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_SET_INSTALL_TEMP_BUNDLE_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_INSTALL_HOST_INSTALLER_FAILED,
        {IStatusReceiver::ERR_INSTALL_HOST_INSTALLER_FAILED, MSG_ERR_INSTALL_HOST_INSTALLER_FAILED}},
    {ERR_APPEXECFWK_INSTALL_PARSE_FAILED, {IStatusReceiver::ERR_INSTALL_PARSE_FAILED, MSG_ERR_INSTALL_PARSE_FAILED}},
    {ERR_APPEXECFWK_INSTALL_VERSION_DOWNGRADE,
        {IStatusReceiver::ERR_INSTALL_VERSION_DOWNGRADE, MSG_ERR_INSTALL_VERSION_DOWNGRADE}},
    {ERR_APPEXECFWK_INSTALL_VERIFICATION_FAILED,
        {IStatusReceiver::ERR_INSTALL_VERIFICATION_FAILED, MSG_ERR_INSTALL_VERIFICATION_FAILED}},
    {ERR_APPEXECFWK_INSTALL_FAILED_INVALID_SIGNATURE_FILE_PATH,
        {IStatusReceiver::ERR_INSTALL_FAILED_INVALID_SIGNATURE_FILE_PATH,
        MSG_ERR_INSTALL_FAILED_INVALID_SIGNATURE_FILE_PATH}},
    {ERR_APPEXECFWK_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE_FILE,
        {IStatusReceiver::ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE_FILE,
            MSG_ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE_FILE}},
    {ERR_APPEXECFWK_INSTALL_FAILED_NO_BUNDLE_SIGNATURE,
        {IStatusReceiver::ERR_INSTALL_FAILED_NO_BUNDLE_SIGNATURE, MSG_ERR_INSTALL_FAILED_NO_BUNDLE_SIGNATURE}},
    {ERR_APPEXECFWK_INSTALL_FAILED_VERIFY_APP_PKCS7_FAIL,
        {IStatusReceiver::ERR_INSTALL_FAILED_VERIFY_APP_PKCS7_FAIL, MSG_ERR_INSTALL_FAILED_VERIFY_APP_PKCS7_FAIL}},
    {ERR_APPEXECFWK_INSTALL_FAILED_PROFILE_PARSE_FAIL,
        {IStatusReceiver::ERR_INSTALL_FAILED_PROFILE_PARSE_FAIL, MSG_ERR_INSTALL_FAILED_PROFILE_PARSE_FAIL}},
    {ERR_APPEXECFWK_INSTALL_FAILED_APP_SOURCE_NOT_TRUESTED,
        {IStatusReceiver::ERR_INSTALL_FAILED_APP_SOURCE_NOT_TRUESTED, MSG_ERR_INSTALL_FAILED_APP_SOURCE_NOT_TRUESTED}},
    {ERR_APPEXECFWK_INSTALL_FAILED_BAD_DIGEST,
        {IStatusReceiver::ERR_INSTALL_FAILED_BAD_DIGEST, MSG_ERR_INSTALL_FAILED_BAD_DIGEST}},
    {ERR_APPEXECFWK_INSTALL_FAILED_BUNDLE_INTEGRITY_VERIFICATION_FAILURE,
        {IStatusReceiver::ERR_INSTALL_FAILED_BUNDLE_INTEGRITY_VERIFICATION_FAILURE,
            MSG_ERR_INSTALL_FAILED_BUNDLE_INTEGRITY_VERIFICATION_FAILURE}},
    {ERR_APPEXECFWK_INSTALL_FAILED_FILE_SIZE_TOO_LARGE,
        {IStatusReceiver::ERR_INSTALL_FAILED_FILE_SIZE_TOO_LARGE, MSG_ERR_INSTALL_FAILED_FILE_SIZE_TOO_LARGE}},
    {ERR_APPEXECFWK_INSTALL_FAILED_BAD_PUBLICKEY,
        {IStatusReceiver::ERR_INSTALL_FAILED_BAD_PUBLICKEY, MSG_ERR_INSTALL_FAILED_BAD_PUBLICKEY}},
    {ERR_APPEXECFWK_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE,
        {IStatusReceiver::ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE, MSG_ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE}},
    {ERR_APPEXECFWK_INSTALL_FAILED_NO_PROFILE_BLOCK_FAIL,
        {IStatusReceiver::ERR_INSTALL_FAILED_NO_PROFILE_BLOCK_FAIL, MSG_ERR_INSTALL_FAILED_NO_PROFILE_BLOCK_FAIL}},
    {ERR_APPEXECFWK_INSTALL_FAILED_BUNDLE_SIGNATURE_VERIFICATION_FAILURE,
        {IStatusReceiver::ERR_INSTALL_FAILED_BUNDLE_SIGNATURE_VERIFICATION_FAILURE,
            MSG_ERR_INSTALL_FAILED_BUNDLE_SIGNATURE_VERIFICATION_FAILURE}},
    {ERR_APPEXECFWK_INSTALL_FAILED_VERIFY_SOURCE_INIT_FAIL,
        {IStatusReceiver::ERR_INSTALL_FAILED_VERIFY_SOURCE_INIT_FAIL, MSG_ERR_INSTALL_FAILED_VERIFY_SOURCE_INIT_FAIL}},
    {ERR_APPEXECFWK_INSTALL_FAILED_DEVICE_UNAUTHORIZED,
        {IStatusReceiver::ERR_INSTALL_FAILED_DEVICE_UNAUTHORIZED, MSG_ERR_INSTALL_FAILED_DEVICE_UNAUTHORIZED}},
    {ERR_APPEXECFWK_INSTALL_FAILED_INCOMPATIBLE_SIGNATURE,
        {IStatusReceiver::ERR_INSTALL_FAILED_INCOMPATIBLE_SIGNATURE, MSG_ERR_INSTALL_FAILED_INCOMPATIBLE_SIGNATURE}},
    {ERR_APPEXECFWK_INSTALL_FAILED_INCONSISTENT_SIGNATURE,
        {IStatusReceiver::ERR_INSTALL_FAILED_INCONSISTENT_SIGNATURE, MSG_ERR_INSTALL_FAILED_INCONSISTENT_SIGNATURE}},
    {ERR_APPEXECFWK_INSTALL_FAILED_MODULE_NAME_EMPTY,
        {IStatusReceiver::ERR_INSTALL_FAILED_MODULE_NAME_EMPTY, MSG_ERR_INSTALL_FAILED_MODULE_NAME_EMPTY}},
    {ERR_APPEXECFWK_INSTALL_FAILED_MODULE_NAME_DUPLICATE,
        {IStatusReceiver::ERR_INSTALL_FAILED_MODULE_NAME_DUPLICATE, MSG_ERR_INSTALL_FAILED_MODULE_NAME_DUPLICATE}},
    {ERR_APPEXECFWK_INSTALL_FAILED_CHECK_HAP_HASH_PARAM,
        {IStatusReceiver::ERR_INSTALL_FAILED_CHECK_HAP_HASH_PARAM, MSG_ERR_INSTALL_FAILED_CHECK_HAP_HASH_PARAM}},
    {ERR_APPEXECFWK_INSTALL_PARAM_ERROR,
        {IStatusReceiver::ERR_INSTALL_PARAM_ERROR, MSG_ERR_INSTALL_PARAM_ERROR}},
    {ERR_APPEXECFWK_INSTALL_PERMISSION_DENIED,
        {IStatusReceiver::ERR_INSTALL_PERMISSION_DENIED, MSG_ERR_INSTALL_PERMISSION_DENIED}},
    {ERR_APPEXECFWK_INSTALL_ENTRY_ALREADY_EXIST,
        {IStatusReceiver::ERR_INSTALL_ENTRY_ALREADY_EXIST, MSG_ERR_INSTALL_ENTRY_ALREADY_EXIST}},
    {ERR_APPEXECFWK_INSTALL_STATE_ERROR,
        {IStatusReceiver::ERR_INSTALL_STATE_ERROR, MSG_ERR_INSTALL_STATE_ERROR}},
    {ERR_APPEXECFWK_INSTALL_FILE_PATH_INVALID,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_INVALID_HAP_NAME,
        {IStatusReceiver::ERR_INSTALL_INVALID_HAP_NAME, MSG_ERR_INSTALL_INVALID_HAP_NAME}},
    {ERR_APPEXECFWK_INSTALL_INVALID_BUNDLE_FILE,
        {IStatusReceiver::ERR_INSTALL_INVALID_BUNDLE_FILE, MSG_ERR_INSTALL_INVALID_BUNDLE_FILE}},
    {ERR_APPEXECFWK_INSTALL_INVALID_HAP_SIZE,
        {IStatusReceiver::ERR_INSTALL_INVALID_HAP_SIZE, MSG_ERR_INSTALL_INVALID_HAP_SIZE}},
    {ERR_APPEXECFWK_INSTALL_GENERATE_UID_ERROR,
        {IStatusReceiver::ERR_INSTALL_GENERATE_UID_ERROR, MSG_ERR_INSTALL_GENERATE_UID_ERROR}},
    {ERR_APPEXECFWK_INSTALL_BUNDLENAME_IS_EMPTY,
        {IStatusReceiver::ERR_INSTALL_GENERATE_UID_ERROR, MSG_ERR_INSTALL_GENERATE_UID_ERROR}},
    {ERR_APPEXECFWK_INSTALL_BUNDLEID_EXCEED_MAX_NUMBER,
        {IStatusReceiver::ERR_INSTALL_GENERATE_UID_ERROR, MSG_ERR_INSTALL_GENERATE_UID_ERROR}},
    {ERR_APPEXECFWK_INSTALL_INSTALLD_SERVICE_ERROR,
        {IStatusReceiver::ERR_INSTALL_INSTALLD_SERVICE_ERROR, MSG_ERR_INSTALL_INSTALLD_SERVICE_ERROR}},
    {ERR_APPEXECFWK_INSTALL_BUNDLE_MGR_SERVICE_ERROR,
        {IStatusReceiver::ERR_INSTALL_BUNDLE_MGR_SERVICE_ERROR, MSG_ERR_INSTALL_BUNDLE_MGR_SERVICE_ERROR}},
    {ERR_APPEXECFWK_INSTALL_ALREADY_EXIST,
        {IStatusReceiver::ERR_INSTALL_ALREADY_EXIST, MSG_ERR_INSTALL_ALREADY_EXIST}},
    {ERR_APPEXECFWK_INSTALL_BUNDLENAME_NOT_SAME,
        {IStatusReceiver::ERR_INSTALL_BUNDLENAME_NOT_SAME, MSG_ERR_INSTALL_BUNDLENAME_NOT_SAME}},
    {ERR_APPEXECFWK_INSTALL_VERSIONCODE_NOT_SAME,
        {IStatusReceiver::ERR_INSTALL_VERSIONCODE_NOT_SAME, MSG_ERR_INSTALL_VERSIONCODE_NOT_SAME}},
    {ERR_APPEXECFWK_INSTALL_VERSIONNAME_NOT_SAME,
        {IStatusReceiver::ERR_INSTALL_VERSIONNAME_NOT_SAME, MSG_ERR_INSTALL_VERSIONNAME_NOT_SAME}},
    {ERR_APPEXECFWK_INSTALL_RELEASETYPE_NOT_SAME,
        {IStatusReceiver::ERR_INSTALL_RELEASETYPE_NOT_SAME, MSG_ERR_INSTALL_RELEASETYPE_NOT_SAME}},
    {ERR_APPEXECFWK_INSTALL_APP_PROVISION_TYPE_NOT_SAME,
        {IStatusReceiver::ERR_INSTALL_APP_PROVISION_TYPE_NOT_SAME,
            MSG_ERR_INSTALL_APP_PROVISION_TYPE_NOT_SAME}},
    {ERR_APPEXECFWK_INSTALL_VERSION_NOT_COMPATIBLE,
        {IStatusReceiver::ERR_INSTALL_VERSION_NOT_COMPATIBLE, MSG_ERR_INSTALL_VERSION_NOT_COMPATIBLE}},
    {ERR_APPEXECFWK_INSTALL_INVALID_NUMBER_OF_ENTRY_HAP,
        {IStatusReceiver::ERR_INSTALL_INVALID_NUMBER_OF_ENTRY_HAP, MSG_ERR_INSTALL_INVALID_NUMBER_OF_ENTRY_HAP}},
    {ERR_APPEXECFWK_INSTALL_GRANT_REQUEST_PERMISSIONS_FAILED,
        {IStatusReceiver::ERR_INSTALL_GRANT_REQUEST_PERMISSIONS_FAILED,
            MSG_ERR_INSTALL_GRANT_REQUEST_PERMISSIONS_FAILED}},
    {ERR_APPEXECFWK_INSTALL_SINGLETON_NOT_SAME,
        {IStatusReceiver::ERR_INSTALL_SINGLETON_NOT_SAME, MSG_ERR_INSTALL_SINGLETON_NOT_SAME}},
    {ERR_APPEXECFWK_INSTALL_ZERO_USER_WITH_NO_SINGLETON,
        {IStatusReceiver::ERR_INSTALL_ZERO_USER_WITH_NO_SINGLETON, MSG_ERR_INSTALL_ZERO_USER_WITH_NO_SINGLETON}},
    {ERR_APPEXECFWK_INSTALL_CHECK_SYSCAP_FAILED,
        {IStatusReceiver::ERR_INSTALL_CHECK_SYSCAP_FAILED, MSG_ERR_INSTALL_CHECK_SYSCAP_FAILED}},
    {ERR_APPEXECFWK_INSTALL_APPTYPE_NOT_SAME,
        {IStatusReceiver::ERR_INSTALL_APPTYPE_NOT_SAME, MSG_ERR_INSTALL_APPTYPE_NOT_SAME}},
    {ERR_APPEXECFWK_INSTALL_TYPE_ERROR, {IStatusReceiver::ERR_INSTALL_TYPE_ERROR, MSG_ERR_INSTALL_TYPE_ERROR}},
    {ERR_APPEXECFWK_INSTALL_SDK_INCOMPATIBLE,
        {IStatusReceiver::ERR_INSTALL_SDK_INCOMPATIBLE, MSG_ERR_INSTALL_SDK_INCOMPATIBLE}},
    {ERR_APPEXECFWK_INSTALL_AN_INCOMPATIBLE,
        {IStatusReceiver::ERR_INSTALL_AN_INCOMPATIBLE, MSG_ERR_INSTALL_AN_INCOMPATIBLE}},
    {ERR_APPEXECFWK_INSTALL_DISK_MEM_INSUFFICIENT,
        {IStatusReceiver::ERR_INSTALL_DISK_MEM_INSUFFICIENT, MSG_ERR_INSTALL_DISK_MEM_INSUFFICIENT}},
    {ERR_APPEXECFWK_NATIVE_INSTALL_FAILED,
        {IStatusReceiver::ERR_INSTALL_NATIVE_FAILED, MSG_ERR_NATIVE_INSTALL_FAILED}},
    {ERR_APPEXECFWK_NATIVE_UNINSTALL_FAILED,
        {IStatusReceiver::ERR_UNINSTALL_NATIVE_FAILED, MSG_ERR_NATIVE_UNINSTALL_FAILED}},
    {ERR_APPEXECFWK_NATIVE_HNP_EXTRACT_FAILED,
        {IStatusReceiver::ERR_NATIVE_HNP_EXTRACT_FAILED, MSG_ERR_NATIVE_HNP_EXTRACT_FAILED}},
    {ERR_APPEXECFWK_PARSE_UNEXPECTED,
        {IStatusReceiver::ERR_INSTALL_PARSE_UNEXPECTED, MSG_ERR_INSTALL_PARSE_UNEXPECTED}},
    {ERR_APPEXECFWK_PARSE_NO_PROFILE,
        {IStatusReceiver::ERR_INSTALL_PARSE_NO_PROFILE, MSG_ERR_INSTALL_PARSE_NO_PROFILE}},
    {ERR_APPEXECFWK_PARSE_BAD_PROFILE,
        {IStatusReceiver::ERR_INSTALL_PARSE_BAD_PROFILE, MSG_ERR_INSTALL_PARSE_BAD_PROFILE}},
    {ERR_APPEXECFWK_PARSE_PROFILE_PROP_TYPE_ERROR,
        {IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_PROP_TYPE_ERROR, MSG_ERR_INSTALL_PARSE_PROFILE_PROP_TYPE_ERROR}},
    {ERR_APPEXECFWK_PARSE_PROFILE_MISSING_PROP,
        {IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_MISSING_PROP, MSG_ERR_INSTALL_PARSE_PROFILE_MISSING_PROP}},
    {ERR_APPEXECFWK_PARSE_PROFILE_PROP_CHECK_ERROR,
        {IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_PROP_CHECK_ERROR, MSG_ERR_INSTALL_PARSE_PROFILE_PROP_CHECK_ERROR}},
    {ERR_APPEXECFWK_PARSE_PROFILE_PROP_SIZE_CHECK_ERROR,
        {IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_PROP_SIZE_CHECK_ERROR,
            MSG_ERR_INSTALL_PARSE_PROFILE_PROP_SIZE_CHECK_ERROR}},
    {ERR_APPEXECFWK_PARSE_RPCID_FAILED,
        {IStatusReceiver::ERR_INSTALL_PARSE_RPCID_FAILED, MSG_ERR_INSTALL_PARSE_RPCID_FAILED}},
    {ERR_APPEXECFWK_PARSE_NATIVE_SO_FAILED,
        {IStatusReceiver::ERR_INSTALL_PARSE_NATIVE_SO_FAILED, MSG_ERR_INSTALL_PARSE_NATIVE_SO_FAILED}},
    {ERR_APPEXECFWK_PARSE_AN_FAILED,
        {IStatusReceiver::ERR_INSTALL_PARSE_AN_FAILED, MSG_ERR_INSTALL_PARSE_AN_FAILED}},
    {ERR_APPEXECFWK_BUNDLE_TYPE_NOT_SAME,
        {IStatusReceiver::ERR_INSTALL_BUNDLE_TYPE_NOT_SAME, MSG_ERR_INSTALL_BUNDLE_TYPE_NOT_SAME}},

    {ERR_APPEXECFWK_INSTALLD_CLEAN_DIR_FAILED,
        {IStatusReceiver::ERR_INSTALLD_CLEAN_DIR_FAILED, MSG_ERR_INSTALLD_CLEAN_DIR_FAILED}},
    {ERR_APPEXECFWK_INSTALLD_RNAME_DIR_FAILED,
        {IStatusReceiver::ERR_INSTALLD_RNAME_DIR_FAILED, MSG_ERR_INSTALLD_RNAME_DIR_FAILED}},
    {ERR_APPEXECFWK_INSTALLD_EXTRACT_FILES_FAILED,
        {IStatusReceiver::ERR_INSTALLD_EXTRACT_FILES_FAILED, MSG_ERR_INSTALLD_EXTRACT_FILES_FAILED}},
    {ERR_APPEXECFWK_INSTALLD_EXTRACT_FAILED,
        {IStatusReceiver::ERR_INSTALL_DISK_MEM_INSUFFICIENT, MSG_ERR_INSTALL_DISK_MEM_INSUFFICIENT}},
    {ERR_APPEXECFWK_INSTALLD_REMOVE_DIR_FAILED,
        {IStatusReceiver::ERR_INSTALLD_REMOVE_DIR_FAILED, MSG_ERR_INSTALLD_REMOVE_DIR_FAILED}},
    {ERR_APPEXECFWK_INSTALLD_CREATE_DIR_FAILED,
        {IStatusReceiver::ERR_INSTALLD_CREATE_DIR_FAILED, MSG_ERR_INSTALLD_CREATE_DIR_FAILED}},
    {ERR_APPEXECFWK_INSTALLD_GET_PROXY_ERROR,
        {IStatusReceiver::ERR_INSTALLD_GET_PROXY_ERROR, MSG_ERR_INSTALLD_GET_PROXY_ERROR}},
    {ERR_APPEXECFWK_INSTALLD_PARAM_ERROR, {IStatusReceiver::ERR_INSTALLD_PARAM_ERROR, MSG_ERR_INSTALLD_PARAM_ERROR}},
    {ERR_APPEXECFWK_INSTALLD_PERMISSION_DENIED, {IStatusReceiver::ERR_INSTALLD_PERMISSION_DENIED,
        MSG_ERR_INSTALLD_PERMISSION_DENIED}},
    {ERR_APPEXECFWK_INSTALLD_SET_SELINUX_LABEL_FAILED, {IStatusReceiver::ERR_INSTALLD_SET_SELINUX_LABEL_FAILED,
        MSG_ERR_INSTALLD_SET_SELINUX_LABEL_FAILED}},

    {ERR_APPEXECFWK_UNINSTALL_MISSING_INSTALLED_MODULE,
        {IStatusReceiver::ERR_UNINSTALL_MISSING_INSTALLED_MODULE, MSG_ERR_UNINSTALL_MISSING_INSTALLED_MODULE}},
    {ERR_APPEXECFWK_UNINSTALL_PARAM_ERROR, {IStatusReceiver::ERR_UNINSTALL_PARAM_ERROR, MSG_ERR_UNINSTALL_PARAM_ERROR}},
    {ERR_APPEXECFWK_UNINSTALL_PERMISSION_DENIED,
        {IStatusReceiver::ERR_UNINSTALL_PERMISSION_DENIED, MSG_ERR_UNINSTALL_PERMISSION_DENIED}},
    {ERR_APPEXECFWK_UNINSTALL_DISPOSED_RULE_FAILED,
        {IStatusReceiver::ERR_UNINSTALL_DISPOSED_RULE_DENIED, MSG_ERR_UNINSTALL_DISPOSED_RULE_DENIED}},
    {ERR_APPEXECFWK_UNINSTALL_BUNDLE_MGR_SERVICE_ERROR,
        {IStatusReceiver::ERR_UNINSTALL_BUNDLE_MGR_SERVICE_ERROR, MSG_ERR_UNINSTALL_BUNDLE_MGR_SERVICE_ERROR}},
    {ERR_APPEXECFWK_UNINSTALL_MISSING_INSTALLED_BUNDLE,
        {IStatusReceiver::ERR_UNINSTALL_MISSING_INSTALLED_BUNDLE, MSG_ERR_UNINSTALL_MISSING_INSTALLED_BUNDLE}},
    {ERR_APPEXECFWK_UNINSTALL_KILLING_APP_ERROR,
        {IStatusReceiver::ERR_UNINSTALL_KILLING_APP_ERROR, MSG_ERR_UNINSTALL_KILLING_APP_ERROR}},
    {ERR_APPEXECFWK_UNINSTALL_SYSTEM_APP_ERROR,
        {IStatusReceiver::ERR_UNINSTALL_SYSTEM_APP_ERROR, MSG_ERR_UNINSTALL_SYSTEM_APP_ERROR}},
    {ERR_APPEXECFWK_UNINSTALL_INVALID_NAME,
        {IStatusReceiver::ERR_UNINSTALL_INVALID_NAME, MSG_ERR_UNINSTALL_INVALID_NAME}},
    {ERR_APPEXECFWK_RECOVER_GET_BUNDLEPATH_ERROR,
        {IStatusReceiver::ERR_RECOVER_GET_BUNDLEPATH_ERROR, MSG_ERR_RECOVER_GET_BUNDLEPATH_ERROR}},
    {ERR_APPEXECFWK_RECOVER_INVALID_BUNDLE_NAME,
        {IStatusReceiver::ERR_RECOVER_INVALID_BUNDLE_NAME, MSG_ERR_RECOVER_INVALID_BUNDLE_NAME}},
    {ERR_APPEXECFWK_UNINSTALL_AND_RECOVER_NOT_PREINSTALLED_BUNDLE,
        {IStatusReceiver::ERR_UNINSTALL_AND_RECOVER_NOT_PREINSTALLED_BUNDLE,
            MSG_ERR_UNINSTALL_AND_RECOVER_NOT_PREINSTALLED_BUNDLE}},
    {ERR_APPEXECFWK_FAILED_SERVICE_DIED,
        {IStatusReceiver::ERR_FAILED_SERVICE_DIED, MSG_ERR_FAILED_SERVICE_DIED}},
    {ERR_APPEXECFWK_OPERATION_TIME_OUT,
        {IStatusReceiver::ERR_OPERATION_TIME_OUT, MSG_ERR_OPERATION_TIME_OUT}},
    {ERR_APPEXECFWK_USER_NOT_EXIST,
        {IStatusReceiver::ERR_USER_NOT_EXIST, MSG_ERR_USER_NOT_EXIST}},
    {ERR_APPEXECFWK_USER_NOT_INSTALL_HAP,
        {IStatusReceiver::ERR_USER_NOT_INSTALL_HAP, MSG_ERR_USER_NOT_INSTALL_HAP}},
    {ERR_APPEXECFWK_INSTALL_NOT_UNIQUE_DISTRO_MODULE_NAME,
        {IStatusReceiver::ERR_INSTALL_NOT_UNIQUE_DISTRO_MODULE_NAME, MSG_ERR_INSTALL_NOT_UNIQUE_DISTRO_MODULE_NAME}},
    {ERR_APPEXECFWK_INSTALL_INCONSISTENT_MODULE_NAME,
        {IStatusReceiver::ERR_INSTALL_INCONSISTENT_MODULE_NAME, MSG_ERR_INSTALL_INCONSISTENT_MODULE_NAME}},
    {ERR_APPEXECFWK_INSTALL_SINGLETON_INCOMPATIBLE,
        {IStatusReceiver::ERR_INSTALL_SINGLETON_INCOMPATIBLE, MSG_ERR_INSTALL_SINGLETON_INCOMPATIBLE}},
    {ERR_BUNDLE_MANAGER_APP_CONTROL_DISALLOWED_INSTALL,
        {IStatusReceiver::ERR_INSTALL_DISALLOWED, MSG_ERR_INSTALL_DISALLOWED}},
    {ERR_BUNDLE_MANAGER_APP_CONTROL_DISALLOWED_UNINSTALL,
        {IStatusReceiver::ERR_UNINSTALL_DISALLOWED, MSG_ERR_UNINSTALL_DISALLOWED}},
    {ERR_APPEXECFWK_UNINSTALL_STATE_NOT_ALLOW,
            {IStatusReceiver::ERR_UNINSTALL_DISALLOWED, MSG_ERR_UNINSTALL_DISALLOWED}},
    {ERR_APPEXECFWK_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST,
        {IStatusReceiver::ERR_APPEXECFWK_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST,
            MSG_ERR_UNINSTALL_SHARE_APP_LIBRARY_NOT_EXIST}},
    {ERR_APPEXECFWK_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED,
        {IStatusReceiver::ERR_APPEXECFWK_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED,
            MSG_ERR_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED}},
    {ERR_APPEXECFWK_UNINSTALL_BUNDLE_IS_SHARED_LIBRARY,
        {IStatusReceiver::ERR_APPEXECFWK_UNINSTALL_BUNDLE_IS_SHARED_LIBRARY,
            MSG_ERR_UNINSTALL_BUNDLE_IS_SHAED_LIBRARY}},
    {ERR_APPEXECFWK_INSTALL_DEVICE_TYPE_NOT_SUPPORTED,
        {IStatusReceiver::ERR_INSTALL_DEVICE_TYPE_NOT_SUPPORTED, MSG_ERR_INSTALL_DEVICE_TYPE_NOT_SUPPORTED}},
    {ERR_APPEXECFWK_INSTALL_SYSCAP_FAILED_AND_DEVICE_TYPE_ERROR,
        {IStatusReceiver::ERR_INSTALL_CHECK_SYSCAP_FAILED_AND_DEVICE_TYPE_NOT_SUPPORTED,
            MSG_ERR_INSTALL_CHECK_SYSCAP_FAILED_AND_DEVICE_TYPE_NOT_SUPPORTED}},
    {ERR_APPEXECFWK_INSTALL_DEPENDENT_MODULE_NOT_EXIST,
        {IStatusReceiver::ERR_INSTALL_DEPENDENT_MODULE_NOT_EXIST, MSG_ERR_INSTALL_DEPENDENT_MODULE_NOT_EXIST}},
    {ERR_APPEXECFWK_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED,
        {IStatusReceiver::ERR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED, MSG_ERR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED}},
    {ERR_APPEXECFWK_INSTALL_COMPATIBLE_POLICY_NOT_SAME,
        {IStatusReceiver::ERR_INSTALL_COMPATIBLE_POLICY_NOT_SAME, MSG_ERR_INSTALL_COMPATIBLE_POLICY_NOT_SAME}},
    {ERR_APPEXECFWK_INSTALL_FILE_IS_SHARED_LIBRARY,
        {IStatusReceiver::ERR_INSTALL_FILE_IS_SHARED_LIBRARY, MSG_ERR_INSTALL_FILE_IS_SHARED_LIBRARY}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_NAME,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_NAME,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_NAME}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INVALID_MODULE_NAME,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_MODULE_NAME,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_INVALID_MODULE_NAME}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_ERROR_HAP_TYPE,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_ERROR_HAP_TYPE,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_ERROR_HAP_TYPE}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_ERROR_BUNDLE_TYPE,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_ERROR_BUNDLE_TYPE,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_ERROR_BUNDLE_TYPE}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_MISSED,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_MISSED,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_MISSED}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_NAME_MISSED,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_NAME_MISSED,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_NAME_MISSED}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_NOT_SAME,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_NOT_SAME,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_NOT_SAME}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INTERNAL_EXTERNAL_OVERLAY_EXISTED_SIMULTANEOUSLY,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_EXTERNAL_OVERLAY_EXISTED_SIMULTANEOUSLY,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_EXTERNAL_OVERLAY_EXISTED_SIMULTANEOUSLY}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_TARGET_PRIORITY_NOT_SAME,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_PRIORITY_NOT_SAME,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_TARGET_PRIORITY_NOT_SAME}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INVALID_PRIORITY,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_PRIORITY,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_INVALID_PRIORITY}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INCONSISTENT_VERSION_CODE,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INCONSISTENT_VERSION_CODE,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_INCONSISTENT_VERSION_CODE}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_SERVICE_EXCEPTION,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_SERVICE_EXCEPTION,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_SERVICE_EXCEPTION}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_BUNDLE_NAME_SAME_WITH_TARGET_BUNDLE_NAME,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_BUNDLE_NAME_SAME_WITH_TARGET_BUNDLE_NAME,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_BUNDLE_NAME_SAME_WITH_TARGET_BUNDLE_NAME}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_NO_SYSTEM_APPLICATION_FOR_EXTERNAL_OVERLAY,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_NO_SYSTEM_APPLICATION_FOR_EXTERNAL_OVERLAY,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_NO_SYSTEM_APPLICATION_FOR_EXTERNAL_OVERLAY}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_DIFFERENT_SIGNATURE_CERTIFICATE,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_DIFFERENT_SIGNATURE_CERTIFICATE,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_DIFFERENT_SIGNATURE_CERTIFICATE}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_IS_OVERLAY_BUNDLE,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_IS_OVERLAY_BUNDLE,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_IS_OVERLAY_BUNDLE}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_IS_OVERLAY_MODULE,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_IS_OVERLAY_MODULE,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_IS_OVERLAY_MODULE}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_OVERLAY_TYPE_NOT_SAME,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_OVERLAY_TYPE_NOT_SAME,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_OVERLAY_TYPE_NOT_SAME}},
    {ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_DIR,
        {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_DIR,
            MSG_ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_DIR}},
    {ERR_APPEXECFWK_INSTALL_CHECK_PROXY_DATA_URI_FAILED,
        {IStatusReceiver::ERR_INSATLL_CHECK_PROXY_DATA_URI_FAILED,
            MSG_ERR_INSTALL_PROXY_DATA_URI_WRONG}},
    {ERR_APPEXECFWK_INSTALL_CHECK_PROXY_DATA_PERMISSION_FAILED,
        {IStatusReceiver::ERR_INSATLL_CHECK_PROXY_DATA_PERMISSION_FAILED,
            MSG_ERR_INSTALL_PROXY_DATA_PERMISSION_WRONG}},
    {ERR_APPEXECFWK_INSTALL_DEBUG_NOT_SAME,
        {IStatusReceiver::ERR_INSTALL_FAILED_DEBUG_NOT_SAME, MSG_ERR_APPEXECFWK_INSTALL_DEBUG_NOT_SAME}},
    {ERR_APPEXECFWK_INSTALL_ISOLATION_MODE_FAILED,
        {IStatusReceiver::ERR_INSTALL_ISOLATION_MODE_FAILED, MSG_ERR_INSTALL_ISOLATION_MODE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_FAILED,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_PARAM_INVALID,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_FILE_PATH_INVALID,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_ENABLE_TIMEOUT,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_INVALID_OWNER_ID,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_OPENSSL_BIO,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_OPENSSL_PKCS7,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_NO_OWNER_ID,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_FSVERITY_NOT_ENABLED,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_CS_SUCCESS_END,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_CS_SUCCESS_END,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_INVALID_EXTENSION_OFFSET,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_EXTENSION_SIGN_SIZE,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_INVALID_PAGE_INFO_EXTENSION,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_FSVREITY_NOT_SUPPORTED,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, MSG_ERR_INSTALL_CODE_SIGNATURE_FAILED}},
    {ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID, MSG_ERR_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID}},
    {ERR_BUNDLE_MANAGER_UNINSTALL_FROM_BMS_EXTENSION_FAILED,
        {IStatusReceiver::ERR_UNINSTALL_FROM_BMS_EXTENSION_FAILED, MSG_ERR_UNINSTALL_FROM_BMS_EXTENSION_FAILED}},
    {ERR_APPEXECFWK_INSTALL_SELF_UPDATE_NOT_MDM,
        {IStatusReceiver::ERR_INSTALL_SELF_UPDATE_NOT_MDM, MSG_ERR_INSTALL_SELF_UPDATE_NOT_MDM}},
    {ERR_APPEXECFWK_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME,
        {IStatusReceiver::ERR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME,
            MSG_ERR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME}},
    {ERR_APPEXECFWK_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED,
        {IStatusReceiver::ERR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED,
            MSG_ERR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED}},
    {ERR_APPEXECFWK_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED,
        {IStatusReceiver::ERR_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED,
            MSG_ERR_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED}},
    {ERR_APPEXECFWK_INSTALLD_COPY_FILE_FAILED,
        {IStatusReceiver::ERR_INSTALLD_COPY_FILE_FAILED, MSG_ERR_INSTALLD_COPY_FILE_FAILED}},
    {ERR_APPEXECFWK_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED,
        {IStatusReceiver::ERR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED,
            MSG_ERR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED}},
    {ERR_APPEXECFWK_INSTALL_CHECK_ENCRYPTION_FAILED,
        {IStatusReceiver::ERR_INSTALL_CHECK_ENCRYPTION_FAILED, MSG_ERR_INSTALL_CHECK_ENCRYPTION_FAILED}},
    {ERR_APPEXECFWK_INSTALL_ENCRYPTION_EXTRACTOR_INIT_FAILED,
        {IStatusReceiver::ERR_INSTALL_CHECK_ENCRYPTION_FAILED, MSG_ERR_INSTALL_CHECK_ENCRYPTION_FAILED}},
    {ERR_APPEXECFWK_INSTALL_ENCRYPTION_OBTAIN_SO_FAILED,
        {IStatusReceiver::ERR_INSTALL_CHECK_ENCRYPTION_FAILED, MSG_ERR_INSTALL_CHECK_ENCRYPTION_FAILED}},
    {ERR_APPEXECFWK_INSTALL_ENCRYPTION_DLL_ERROR,
        {IStatusReceiver::ERR_INSTALL_CHECK_ENCRYPTION_FAILED, MSG_ERR_INSTALL_CHECK_ENCRYPTION_FAILED}},
    {ERR_BUNDLE_MANAGER_CODE_SIGNATURE_DELIVERY_FILE_FAILED,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_DELIVERY_FILE_FAILED,
            MSG_ERR_INSTALL_CODE_SIGNATURE_DELIVERY_FILE_FAILED}},
    {ERR_BUNDLE_MANAGER_CODE_SIGNATURE_REMOVE_FILE_FAILED,
        {IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_REMOVE_FILE_FAILED,
            MSG_ERR_INSTALL_CODE_SIGNATURE_REMOVE_FILE_FAILED}},
    {ERR_APPEXECFWK_INSTALL_FAILED_CONTROLLED,
        {IStatusReceiver::ERR_INSTALL_CODE_APP_CONTROLLED_FAILED,
            MSG_ERR_INSTALL_CODE_APP_CONTROLLED_FAILED}},
    {ERR_APPEXECFWK_INSTALL_FAILED_ACCOUNT_CONSTRAINT,
        {IStatusReceiver::ERR_INSTALL_CODE_APP_CONTROLLED_FAILED,
            MSG_ERR_INSTALL_CODE_APP_CONTROLLED_FAILED}},
    {ERR_APPEXECFWK_INSTALL_APP_IN_BLOCKLIST,
        {IStatusReceiver::ERR_INSTALL_CODE_APP_CONTROLLED_FAILED,
            MSG_ERR_INSTALL_CODE_APP_CONTROLLED_FAILED}},
    {ERR_APPEXECFWK_INSTALL_FORCE_UNINSTALLED_BUNDLE_NOT_ALLOW_RECOVER,
        {IStatusReceiver::ERR_APPEXECFWK_INSTALL_FORCE_UNINSTALLED_BUNDLE_NOT_ALLOW_RECOVER,
            MSG_ERR_INSTALL_CODE_APP_CONTROLLED_FAILED}},
    {ERR_APPEXECFWK_INSTALL_PREINSTALL_BUNDLE_ONLY_ALLOW_FORCE_UNINSTALLED_BY_EDC,
        {IStatusReceiver::ERR_APPEXECFWK_INSTALL_PREINSTALL_BUNDLE_ONLY_ALLOW_FORCE_UNINSTALLED_BY_EDC,
            MSG_ERR_INSTALL_CODE_APP_CONTROLLED_FAILED}},
    {ERR_APPEXECFWK_UNINSTALL_CONTROLLED,
        {IStatusReceiver::ERR_UNINSTALL_CONTROLLED,
            MSG_ERR_UNINSTALL_CONTROLLED}},
    // debug encrypted bundle not allowed to install, errCode
    {ERR_APPEXECFWK_INSTALL_DEBUG_ENCRYPTED_BUNDLE_FAILED,
        {IStatusReceiver::ERR_INSTALL_DEBUG_ENCRYPTED_BUNDLE_FAILED, MSG_ERR_INSTALL_DEBUG_ENCRYPTED_BUNDLE_FAILED}},
    {ERR_APPEXECFWK_INSTALL_RELEASE_BUNDLE_NOT_ALLOWED_FOR_SHELL,
        {IStatusReceiver::ERR_INSTALL_RELEASE_BUNDLE_NOT_ALLOWED_FOR_SHELL,
            MSG_ERR_INSTALL_RELEASE_BUNDLE_NOT_ALLOWED_FOR_SHELL}},
    {ERR_APPEXECFWK_INSTALL_ENCRYPTED_BUNDLE_NOT_ALLOWED_FOR_SHELL,
        {IStatusReceiver::ERR_INSTALL_ENCRYPTED_BUNDLE_NOT_ALLOWED_FOR_SHELL,
            MSG_ERR_INSTALL_ENCRYPTED_BUNDLE_NOT_ALLOWED_FOR_SHELL}},
    {ERR_APPEXECFWK_INSTALL_APPID_NOT_SAME_WITH_PREINSTALLED,
        {IStatusReceiver::ERR_INSTALL_APPID_NOT_SAME_WITH_PREINSTALLED,
            MSG_ERR_INSTALL_APPID_NOT_SAME_WITH_PREINSTALLED}},
    {ERR_APPEXECFWK_INSTALL_BUNDLE_NOT_ALLOWED_FOR_SHELL_IN_OOBE,
        {IStatusReceiver::ERR_INSTALL_BUNDLE_NOT_ALLOWED_FOR_SHELL_IN_OOBE,
            MSG_ERR_INSTALL_BUNDLE_NOT_ALLOWED_FOR_SHELL_IN_OOBE}},
    {ERR_APPEXECFWK_INSTALL_OS_INTEGRATION_BUNDLE_NOT_ALLOWED_FOR_SHELL,
        {IStatusReceiver::ERR_APPEXECFWK_INSTALL_OS_INTEGRATION_BUNDLE_NOT_ALLOWED_FOR_SHELL,
            MSG_ERR_INSTALL_OS_INTEGRATION_BUNDLE_NOT_ALLOWED_FOR_SHELL}},
    {ERR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL,
        {IStatusReceiver::ERR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL_ISR,
            MSG_ERR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL}},
    {ERR_APPEXECFWK_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED,
        {IStatusReceiver::ERR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED,
            MSG_ERR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED}},
    {ERR_APPEXECFWK_PLUGIN_INSTALL_NOT_ALLOW,
        {IStatusReceiver::ERR_INSTALL_PARSE_FAILED, MSG_ERR_INSTALL_PARSE_FAILED}},
    {ERR_APPEXECFWK_INSTALL_U1ENABLE_CAN_ONLY_INSTALL_IN_U1_WITH_NOT_SINGLETON,
        {IStatusReceiver::ERR_INSTALL_U1ENABLE_CAN_ONLY_INSTALL_IN_U1_WITH_NOT_SINGLETON,
            MSG_ERR_INSTALL_U1ENABLE_CAN_ONLY_INSTALL_IN_U1_WITH_NOT_SINGLETON}},
    {ERR_APPEXECFWK_INSTALL_BUNDLE_CAN_NOT_BOTH_EXISTED_IN_U1_AND_OTHER_USERS,
        {IStatusReceiver::ERR_INSTALL_BUNDLE_CAN_NOT_BOTH_EXISTED_IN_U1_AND_OTHER_USERS,
            MSG_ERR_INSTALL_BUNDLE_CAN_NOT_BOTH_EXISTED_IN_U1_AND_OTHER_USERS}},
    {ERR_APPEXECFWK_INSTALL_U1_ENABLE_NOT_SAME_IN_ALL_BUNDLE_INFOS,
        {IStatusReceiver::ERR_INSTALL_U1_ENABLE_NOT_SAME_IN_ALL_BUNDLE_INFOS,
            MSG_ERR_INSTALL_U1_ENABLE_NOT_SAME_IN_ALL_BUNDLE_INFOS}},
    {ERR_APPEXECFWK_INSTALL_U1_ENABLE_NOT_SUPPORT_APP_SERVICE_AND_SHARED_BUNDLE,
        {IStatusReceiver::ERR_INSTALL_CODE_APP_CONTROLLED_FAILED,
            MSG_ERR_INSTALL_CODE_APP_CONTROLLED_FAILED}},
    {ERR_APPEXECFWK_INSTALL_NOT_SUPPORT_STATIC_ATOMIC_SERVICE,
        {IStatusReceiver::ERR_INSTALL_NOT_SUPPORT_STATIC_ATOMIC_SERVICE,
            MSG_ERR_INSTALL_NOT_SUPPORT_STATIC_ATOMIC_SERVICE}},
    {ERR_APPEXECFWK_DB_SQL_MUST_BE_QUERY_STATEMENT,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_COLUMN_OUT_OF_BOUNDS,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_INVALID_DATABASE_PATH,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_ROW_OUT_OF_BOUNDS,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_NO_DATA_MEETS_CONDITION,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_ALREADY_CLOSED,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_DO_NOT_RESPOND,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_THE_WAL_FILE_SIZE_OVER_DEFAULT_LIMIT,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_FAILED_TO_GET_DATA_OBS_MGR_CLIENT,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_THE_TYPE_OF_DISTRIBUTED_TABLE_NOT_MATCH,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_IS_FULL,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_NOT_SUPPORT_THS_SQL,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_IS_ALREADY_ATTACHED,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_GENERIC_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_CORRUPTED,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_CALLBACK_ROUTINE_REQUESTED_AN_ABORT,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_ACCESS_PERMISSION_DENIED,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_FILE_IS_LOCKED,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_TABLE_IS_LOCKED,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_DB_IS_OUT_OF_MEMORY,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_ATTEMPT_WRITE_READONLY_DB,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_SOME_KIND_OF_DISK_IO_ERROR,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_UNABLE_OPEN_DB_FILE,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_TEXT_OR_BLOB_EXCEED_SIZE_LIMIT,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_ABORT_DUE_TO_CONSTRAINT_VIOLATION,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_DATA_TYPE_MISMATCH,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_SQL_LIBRARY_USED_INCORRECTLY,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_CONFIG_CHANGED,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_DB_CAPABILITY_NOT_SUPPORT,
        {IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, MSG_ERR_INSTALL_INTERNAL_ERROR}},
    {ERR_APPEXECFWK_INSTALL_FILE_PATH_EMPTY,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_INVALID_FILE_NAME_SIZE,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_FILE_PATH_IS_NOT_REAL,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_ACCESS_FILE_FAILED,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_STAT_FILE_FAILED,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_OPENDIR_FAILED,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_HAP_NUMBER_EXCEED_MAX_NUMBER,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_FILE_NUMBER_EXCEED_MAX_NUMBER_IN_HSP_LIB_PATH,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_RENAME_INSTALL_FILE_PATH_NOT_START_WITH_APP_INSTALL_SANDBOX,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_ONLY_HSP_OR_SIG_FILE_CAN_BE_CONTAINED_IN_SHARED_BUNDLE_DIR,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_ONLY_ONE_HSP_FILE_CAN_BE_CONTAINED_IN_SHARED_BUNDLE_DIR,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_ONLY_ONE_SIG_FILE_CAN_BE_CONTAINED_IN_SHARED_BUNDLE_DIR,
        {IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, MSG_ERR_INSTALL_FILE_PATH_INVALID}},
    {ERR_APPEXECFWK_INSTALL_MORE_THAN_ONE_APP,
        {IStatusReceiver::ERR_INSTALL_MORE_THAN_ONE_APP, MSG_ERR_INSTALL_MORE_THAN_ONE_APP}},
    {ERR_APPEXECFWK_INSTALL_DECOMPRESS_APP_FAILED,
        {IStatusReceiver::ERR_INSTALL_DECOMPRESS_APP_FAILED, MSG_ERR_INSTALL_DECOMPRESS_APP_FAILED}},
    {ERR_APPEXECFWK_INSTALL_NO_SUITABLE_BUNDLES,
        {IStatusReceiver::ERR_INSTALL_NO_SUITABLE_BUNDLES, MSG_ERR_INSTALL_NO_SUITABLE_BUNDLES}},
    {ERR_APPEXECFWK_INSTALL_VERIFY_APP_SIGNATURE_FAILED,
        {IStatusReceiver::ERR_INSTALL_VERIFY_APP_SIGNATURE_FAILED, MSG_ERR_INSTALL_VERIFY_APP_SIGNATURE_FAILED}},
    
};
}  // namespace

StatusReceiverProxy::StatusReceiverProxy(const sptr<IRemoteObject> &object) : IRemoteProxy<IStatusReceiver>(object)
{
    APP_LOGD("create status receiver proxy instance");
}

StatusReceiverProxy::~StatusReceiverProxy()
{
    APP_LOGD("destroy status receiver proxy instance");
}

void StatusReceiverProxy::OnStatusNotify(const int32_t progress)
{
    APP_LOGI("service status %{public}d", progress);

    MessageParcel data;
    MessageParcel reply;
    MessageOption option(MessageOption::TF_SYNC);
    if (!data.WriteInterfaceToken(StatusReceiverProxy::GetDescriptor())) {
        APP_LOGE("fail to OnStatusNotify due to write MessageParcel fail");
        return;
    }

    if (!data.WriteInt32(progress)) {
        APP_LOGE("fail to call OnStatusNotify, for write progress failed");
        return;
    }

    sptr<IRemoteObject> remote = Remote();
    if (remote == nullptr) {
        APP_LOGE("fail to call OnStatusNotify, for Remote() is nullptr");
        return;
    }

    int32_t ret =
        remote->SendRequest(static_cast<int32_t>(StatusReceiverInterfaceCode::ON_STATUS_NOTIFY), data, reply, option);
    if (ret != NO_ERROR) {
        APP_LOGE("fail call OnStatusNotify, for transact failed, error code %{public}d", ret);
    }
}

void StatusReceiverProxy::OnFinished(const int32_t resultCode, const std::string &resultMsg)
{
    APP_LOGI("result %{public}d, %{public}s", resultCode, resultMsg.c_str());
    // transform service error code to client error code.
    TransformResult(resultCode);
    if (!resultMsg.empty()) {
        resultMsg_ = resultMsg;
    }
    CloseStreamInstaller(streamInstallerId_);
    MessageParcel data;
    MessageParcel reply;
    MessageOption option(MessageOption::TF_SYNC);
    if (!data.WriteInterfaceToken(StatusReceiverProxy::GetDescriptor())) {
        APP_LOGE("fail to OnFinished due to write MessageParcel fail");
        return;
    }

    if (!data.WriteInt32(resultCode_)) {
        APP_LOGE("fail to call OnFinished, for write resultCode_ failed");
        return;
    }
    if (!data.WriteString16(Str8ToStr16(resultMsg_))) {
        APP_LOGE("fail to call OnFinished, for write resultMsg_ failed");
        return;
    }
    if (!data.WriteInt32(resultCode)) {
        APP_LOGE("fail to call OnFinished, for write resultCode failed");
        return;
    }

    sptr<IRemoteObject> remote = Remote();
    if (remote == nullptr) {
        APP_LOGE("fail to call OnFinished, for Remote() is nullptr");
        return;
    }

    int32_t ret = remote->SendRequest(
        static_cast<int32_t>(StatusReceiverInterfaceCode::ON_FINISHED), data, reply, option);
    if (ret != NO_ERROR) {
        APP_LOGE("fail call OnFinished, for transact failed, error code %{public}d", ret);
    }
}

void StatusReceiverProxy::TransformResult(const int32_t resultCode)
{
    auto result = MAP_RECEIVED_RESULTS.find(resultCode);
    if (result != MAP_RECEIVED_RESULTS.end()) {
        resultCode_ = result->second.clientCode;
        resultMsg_ = result->second.clientMessage;
    } else {
        resultCode_ = ERR_UNKNOWN;
        resultMsg_ = MSG_ERR_UNKNOWN;
    }
    APP_LOGD("result transformed is %{public}d, %{public}s", resultCode_, resultMsg_.c_str());
}

void StatusReceiverProxy::CloseStreamInstaller(uint32_t installerId)
{
    if (installerId <= 0) {
        APP_LOGE("installer id: %{public}u", installerId);
        return;
    }
    sptr<IBundleInstaller> bundleInstaller = DelayedSingleton<BundleMgrService>::GetInstance()->GetBundleInstaller();
    if (bundleInstaller == nullptr) {
        APP_LOGE("bundle install is nullptr");
        return;
    }
    bundleInstaller->DestoryBundleStreamInstaller(installerId);
    streamInstallerId_ = 0;
}

void StatusReceiverProxy::SetStreamInstallId(uint32_t installerId)
{
    streamInstallerId_ = installerId;
}
}  // namespace AppExecFwk
}  // namespace OHOS
